repo.or.cz
/
and.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding file descriptor in template.
[and.git]
/
10696 - f91
/
10696.cpp
blob
53a8ae9f7bd8eb207716914303e5f5e262fc1845
1
/*
2
Accepted
3
*/
4
#include <stdio.h>
5
6
int
f
[
1000001
];
7
8
int
main
(
int
argc
,
char const
*
argv
){
9
for
(
int
i
=
1000000
;
i
>
100
; --
i
){
10
f
[
i
] =
i
-
10
;
11
}
12
for
(
int
i
=
100
;
i
>
0
; --
i
){
13
f
[
i
] =
f
[
f
[
i
+
11
]];
14
}
15
16
int
n
;
17
while
(
scanf
(
"%d"
, &
n
) ==
1
&&
n
){
18
printf
(
"f91(%d) = %d
\n
"
,
n
,
f
[
n
]);
19
}
20
21
return
0
;
22
}